package club.kingyin.commons.entity.core;

import club.kingyin.commons.enums.BlogEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * (Document)表实体类
 *
 * @author makejava
 * @since 2022-02-16 18:14:08
 */
@Data
@SuppressWarnings("serial")
public class Document extends Model<Document> {
    //ID
    @TableId(type = IdType.AUTO)
    private Integer id;
    //标签
    private String title;
    //发布时间
    private Long timestamp;
    //正文
    private String context;
    //标签
    private String tag;
    //标签
    private BlogEnum status;
    //用户ID
    private Integer userid;
    //背景图片
    private String background;
    //简介
    private String slogan;
    //访问量
    private Long views;
    //更新时间
    private Long updatetime;
    //文章分类
    private String classify;


    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}

